package com.atguigu.ssyx.user.api;

import com.atguigu.ssyx.user.service.IUserService;
import com.atguigu.ssyx.vo.user.LeaderAddressVo;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/api/user/leader")
@RequiredArgsConstructor
@RestController

public class LeaderAddressApiController {
    private final IUserService userService;
    //1.根据userid查询提货点和团长信息

    @ApiOperation("提货点地址信息")
    @GetMapping("/inner/getUserAddressByUserId/{userId}")
    public LeaderAddressVo getUserAddressByUserId(@PathVariable Long userId) {
        return userService.getLeaderAddressByUserId(userId);
    }
}
